import Taro from '@tarojs/taro'
import api from '../api/index'


export default async function getOpenId() {
  const { code } = await Taro.login()
  try{
    const data = await api.user.getWxOpenId({
      code
    })
    return data
  } catch (e) {

  }
}
